package org.io4j.data;

/**
 * A source of bytes that can be read from.
 */
public interface ByteSource {

	/**
	 * Reads the contents from this {@code ByteSource} into a byte array.
	 * 
	 * @return byte array containing contents
	 * @throws DataTransferException
	 *            if an error occurred during the operation
	 */
	byte[] readBytes();
}
